package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Name string `gorm:"type:varchar(30)" json:"name"`
}
type Sp struct {
	gorm.Model
	Title   string `gorm:"type:varchar(30)" json:"title"`
	Content string `gorm:"type:varchar(100)" json:"content"`
	Img     string `gorm:"type:varchar(255)" json:"img"`
	UserID  uint   `gorM:"type:int" json:"user_id"`
	User    User   `gorm:"foreignKey:UserID"`
	TypeID  uint   `gorM:"type:int" json:"type_id"`
	Type    Type   `gorm:"foreignKey:TypeID"`
}
type Type struct {
	gorm.Model
	Name string `gorm:"type:varchar(30)" json:"name"`
}
